<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<style>
body{cursor:default;margin:10;border:1px solid #000000;}
input{font-size:10px;font-family:Verdana;border:1px solid #000000;}
td{font-size:10px;font-family:Verdana}
select{font-size:10px;font-family:Verdana}
.button{background-color:transparent;}
</style>
<script>
	var oWidth = "";
	var oHeight = "";
	window.onload = function(){
		tObj = document.getElementById("iTable");
		oWidth = tObj.offsetWidth;
		oHeight = tObj.offsetHeight;
	}
	window.resizeTo = function(){
		width = oWidth;
		height = oHeight;
	}
	window.onload = backValue;


	function addlink()
	{	
		var editor = window.dialogArguments.editor;
        editor.execCmd(5050);
		editor.insertHTML('<a href='+url.value+'>','</a>',false);
		kill();
	}

	function kill()
	{
		window.close();
	}
	function backValue()
	{	
		var url = document.getElementById("url");
		var editor					= window.dialogArguments.editor;
		var curSel					= editor.editControl.DOM.selection;
		var curRng					= curSel.createRange();
		var curTag					= editor.offsetToNode();
		if(curTag.tagName=='A' && curTag.getAttribute('href')!=null)
		{
			url.value				= curTag.getAttribute('href');
		}
		else
		{
			url.value				= 'http://';
		}
		url.focus();
	}

</script>
</HEAD>

<BODY>
<TABLE border=0 cellspacing=0 cellpadding=3 id=iTable>
<tr>
<td>URL:</td>
<td><input type=text id=url value="http://"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type=button onclick=addlink() value=OK class=button> <input type=button onclick=kill() value=Cancel class=button></td>
</tr>
</TABLE>
</BODY>
</HTML>
